package com.xpu.pms.comm.http;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@Accessors(chain = true)
@AllArgsConstructor
public class PageInfo {
    public PageInfo(IPage page) {
        this.index = (int) page.getCurrent();
        this.size = (int) page.getSize();
        this.total = (int) page.getTotal();
    }

    private  Integer index;
    private  Integer total;
    private  Integer size;
}
